import axios from 'axios';

axios.defaults.baseURL = 'http://localhost:3001';

const summery = {
    getdata:async(page,name,time)=>{
        const {data:{data,total}} = await axios.get('/yg/gettest',{params:{page,name,time}})
        return {data,total};
    },
    getstudent :async(page,pageSize,name,tid,sex)=>{
        const {data:{data,total}} = await axios.get('/yg/getstudent',{params:{page,pageSize,name,tid,sex}})
        return {data,total}
    },
    upflag:async(id,flag)=>{
        const {data:{data}} = await axios.post('/yg/upflag',{id,flag})
        return data
    },
    getstate:async()=>{
        const {data:{data}} = await axios.get('/yg/getstage')
        return data
    },
    getclass:async()=>{
        const {data:{data}} = await axios.get('/yg/getclazz')
        return data
    },
    getruslt:async()=>{
        const {data:{data}} = await axios.get('/yg/getresult')
        return data
    }
    

}

export default summery;